package database;

import java.util.ArrayList;
import java.util.List;

public abstract class Staff extends Individual {

	private List<Patient> patients = new PatientList();

	public List<Patient> getPatients() {
		return patients;
	}

	public RecordList getRecords() {
		RecordList records = new RecordList();
		for (Patient p : getPatients())
			records.add(p.getRecords());
		return records;
	}

	private class PatientList extends ArrayList<Patient> {

		public boolean add(Patient p) {
			if (!contains(p))
				return add(p);
			return false;
		}

	}
}
